package com.yenlien.traceyun.plant.dao;

import com.yenlien.traceyun.plant.entity.OrderDetailed;
import com.yenlien.traceyun.webase.dao.BaseJpaDao;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * Created by LiuSha on 2020/7/28.
 */
public interface OrderDetailedDao extends BaseJpaDao<OrderDetailed> {
    OrderDetailed findById(String id);

    List<OrderDetailed> findByOrderId(String orderId);

    @Query(value = "select t from OrderDetailed t where t.storageId=?1 and t.isOut=0")
    List<OrderDetailed> findByStorageId(String storageId);

}
